<{include file="common/header.tpl"}>
<script src="/resource/laydate/laydate.js" type="text/javascript"></script>
<style>
.fcontent { padding: 1em 2em; }
.fcontent .pagination { padding: 1em 10px; }
.hidden { display: none; }
table.gridtable {
    width: 90%;
    font-family: verdana,arial,sans-serif;
    font-size:12px;
    color:#333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
}
table.gridtable th {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
}
table.gridtable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
}

.noul { list-style: none; line-height: 2.5em; padding: 0;}
.noul li { line-height: 2em; }
.noul li.last { padding-top: 1em; }
.noul li label { display: inline-block; width: 100px; text-align: right; padding-right: 10px; }

.filter { margin: 10px 0; }
.filter .btn {background-image: none; padding: 2px 10px; font-weight: normal; height: auto; }
</style>

<div class="fcontent">
    <h3>平台对账单</h3> 
    <div class="filter">
        <form action="/admin/shareshop/list" method="GET">
        <label>起始日:</label>
            <input onclick="laydate()" name="startDay" value="<{$filter.startDay}>"> 
        <label>结束日:</label>
            <input onclick="laydate()" name="stopDay" value="<{$filter.stopDay}>"> 
        <label>哇吖：</label>
            <select name="shopId">
                <option value="0">全部哇吖</option>
                <{foreach from=$filter.shopList key="shopId" item="shopName"}>
                <option value="<{$shopId}>" <{if $filter.shopId == $shopId}>selected="selected"<{/if}>><{$shopName}></option>
                <{/foreach}>
            </select>
        <input type="submit" class="btn" value="过滤">
        </form>
    </div>
    <table class="gridtable">
    <tr>
        <th>哇吖</th>
        <th>订单编号</th>
        <th>支付时间</th>
        <th>订单状态</th>
        <th>商品金额</th>
        <th>快递金额</th>
        <th>金币抵扣</th>
        <th>支付金额</th>
        <th>返利金额</th>
        <th>哇吖结算</th>
    </tr>
    <{foreach from=$records item=rs}>
    <tr>
        <td><{$rs.shopName}></td>
        <td><a href="/admin/order/detail/<{$rs.orderId}>" target="_blank"><{$rs.orderNo}></a></td>
        <td><{"m-d H:i"|date:$rs.paidTime}></td>
        <td><{$rs.orderStatusName}></td>
        <td>￥<{$rs.moneyGoods/100|number_format:2}></td>
        <td>￥<{$rs.moneyDeliver/100|number_format:2}></td>
        <td>￥<{$rs.moneyCoin/100|number_format:2}></td>
        <td>￥<{$rs.moneyTotal/100|number_format:2}></td>
        <td><a href="/admin/shareshop/sharedMoney/<{$rs.orderNo}>" target="_blank">￥<{$rs.moneyIncome/100|number_format:2}></a></td>
        <td>￥<{$rs.moneyShop/100|number_format:2}></td>
    </tr>
    <{/foreach}>
    <tr>
        <td>合计</td>
        <td colspan="8">&nbsp;</td>
        <td>￥<{$moneyShopTotal/100|number_format:2}></td>
    </tr>
    </table>

    <div class="desc">
        <h3>说明</h3>
        <p>哇吖结算 = 商品金额 + 快递费用 - 返利金额</p>
        <p>返利金额 = 直接分享返利(10元) + 分享者上线获利(5元) 注：若上线不存在，则不返5元</p>
    </div>

    <div><{$pagination}></div>
</div>

<{include file="common/footer.tpl"}>
